package com.jlpay.openapi.demo.ledger.merchconf;

import com.jlpay.open.jlpay.sdk.java.model.ledger.request.MerchRevUnbindRequest;
import com.jlpay.open.jlpay.sdk.java.model.ledger.response.MerchRevUnbindResponse;
import com.jlpay.open.jlpay.sdk.java.utils.json.JsonUtils;
import com.jlpay.openapi.demo.JlpayOpenApiService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 *
 * @author dengwenning
 * @since 2024/8/30
 **/
public class MerchRevUnbindService {

    private static final Logger LOGGER = LoggerFactory.getLogger(MerchRevUnbindService.class);

    public static void main(String[] args) {
        MerchRevUnbindRequest merchRevUnbindRequest = buildMerchRevUnbindRequest();
        MerchRevUnbindResponse merchRevUnbindResponse = JlpayOpenApiService.openMerchService()
                .post(merchRevUnbindRequest, MerchRevUnbindResponse.class);
        LOGGER.info("分账配置解绑入账方响应:{}", JsonUtils.toString(merchRevUnbindResponse));
    }

    private static MerchRevUnbindRequest buildMerchRevUnbindRequest() {
        MerchRevUnbindRequest merchRevBindRequest = new MerchRevUnbindRequest();
        merchRevBindRequest.setOrgCode("50720711");
        merchRevBindRequest.setMchId("849581183510017");
        merchRevBindRequest.setRevMchId("849584307420004");
        return merchRevBindRequest;
    }
}
